package fr.bitstrip.sitn.model;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;

import org.springframework.stereotype.Component;

@Component
@Entity
public class Utilisateur extends Model {
        private String login;
        private String password;
        private String prenom;
        private String nom;
        private String email;

        private String facebook_id;
        
        @Column(name = "role")
        private String role = "ROLE_USER";
        
        private String facebook_token;
        
        @ManyToOne
        private Avatar avatar;
        
        public Utilisateur() {
                super();
        }       
         
        public Utilisateur(String login, String password, String prenom,
                        String nom, String email, String facebook_id, String role,
                        String facebook_token) {
                super();
                this.login = login;
                this.prenom = prenom;
                this.nom = nom;
                this.email = email;
                this.facebook_id = facebook_id;
                this.role = role;
                this.facebook_token = facebook_token;
        }
        
        public String getLogin() {
                return login;
        }

        public String getPassword() {
                return password;
        }

        public void setPassword(String password) {
                this.password = password;
        }

        public void setLogin(String login) {
                this.login = login;
        }

        public String getPrenom() {
                return prenom;
        }

        public void setPrenom(String prenom) {
                this.prenom = prenom;
        }

        public String getNom() {
                return nom;
        }

        public void setNom(String nom) {
                this.nom = nom;
        }

        public String getFacebook_id() {
                return facebook_id;
        }

        public void setFacebook_id(String facebook_id) {
                this.facebook_id = facebook_id;
        }

        public String getRole() {
                return role;
        }

        public void setRole(String role) {
                this.role = role;
        }

        public String getEmail() {
                return email;
        }

        public void setEmail(String email) {
                this.email = email;
        }
        
        public String getFacebook_token() {
                return facebook_token;
        }

        public void setFacebook_token(String facebook_token) {
                this.facebook_token = facebook_token;
        }
        public Avatar getAvatar() {
                return avatar;
        }

        public void setAvatar(Avatar avatar) {
                this.avatar = avatar;
        }
        
}
